package com.ld.test;

import com.ld.pojo.Book;
import com.ld.pojo.Books;
import com.ld.pojo.Students;
import com.ld.service.HelloService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @Author: Liudao
 * @Date: 2022-08-23-15:12
 * @Description:
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class test {

    @Autowired
    private Book book;
    @Autowired
    private Students students;
    @Autowired
    private Books books;
    @Autowired
    private HelloService helloService;

//普通属性值的注入
    @Test
    public void test1(){
        System.out.println("book = " + book);
    }
//数组数据类型的注入
    @Test
    public void test2(){
        System.out.println(students.getMyStudents());
    }
//数组对象类型的注入
    @Test
    public void test3(){
        System.out.println(books.getBooks());
    }
//测试自定义starter
    @Test
    public void test4(){
        helloService.hello();
    }
}
